home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / ex / Line.h < prev    next >
C/C++ Source or Header  |  1990-05-15  |  907b  |  30 lines

  1. #ifndef LINE_H
  2. #define LINE_H
  3.  
  4. // Line.h -- Line shape
  5.  
  6. // $Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/ex/RCS/Line.h,v 3.0 90/05/15 22:43:40 kgorlen Rel $
  7.  
  8. #include "Shape.h"
  9.  
  10. class Line: public Shape {
  11.     DECLARE_MEMBERS(Line);
  12.     Point p;            // end point
  13. protected:              // storer() functions for object I/O
  14.     virtual void storer(OIOofd&) const;
  15.     virtual void storer(OIOout&) const;
  16. public:
  17.     Line(const Point& a, const Point& b) : Shape(a), p(b) {}
  18.     bool operator==(const Line&) const;
  19.     bool operator!=(const Line& a) const    { return !(*this==a); }
  20.     virtual void move(const Point& d);
  21.     virtual void draw() const;
  22.     virtual void deepenShallowCopy();
  23.     virtual unsigned hash() const;
  24.     virtual bool isEqual(const Object&) const;
  25.     virtual void printOn(ostream& strm =cout) const;
  26.     virtual const Class* species() const;
  27. };
  28.  
  29. #endif
  30.